package khs.java_math.main.java;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Random;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args ) throws IOException
    {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        
        System.out.print("input float: ");
        float input_float = Float.valueOf(bufferedReader.readLine());
        float round = Float.valueOf(String.format("%3f", input_float));
        round = (float) (Math.round(round*Math.pow(10, 2))/Math.pow(10, 2));
        
        System.out.println("round: " + String.valueOf(round));
        
        System.out.print("input min: ");
        int input_min = Integer.valueOf(bufferedReader.readLine());
        System.out.print("input max: ");
        int input_max = Integer.valueOf(bufferedReader.readLine());
        
        Random random = new Random(System.currentTimeMillis());
        int rand = random.nextInt(input_max - input_min) + input_min;
        
        System.out.println("rand: " + String.valueOf(rand));
    }
}
